Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update required PHP and platform PHP. #1088

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Conversation

barryhughes
Copy link
Member

  • Our composer.json and the currently committed composer.lock are out of sync.
  • We can't update various dependencies, because we (were) setting the platform PHP version to 5.6.
  • We now expect and require PHP 7.0 as a minimum, so this should be reflected in these files.

@barryhughes barryhughes requested review from a team and coreymckrill and removed request for a team August 15, 2024 19:10
@barryhughes
Copy link
Member Author

Part of the motivation here is to resolve a class of CI errors that are blocking various tests.

@coreymckrill
Copy link
Contributor

Given that WordPress itself requires a minimum of PHP 7.2, could we bump these numbers further up?

@coreymckrill
Copy link
Contributor

Er, our support policy here is WP - 2, right? WordPress supported PHP 7.0 until 6.6, so I guess if we want to peg to WP's minimum requirements, we can't bump past 7.0 quite yet.

@@ -20,7 +20,7 @@
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "5.6"
"php": "7.1"
Copy link
Contributor

@coreymckrill coreymckrill Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this not be the same value as require?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To satisfy the constraints of our current PHPUnit requirement (PHPUnit 7.5.20 asks for PHP 7.1+). In CI this isn't an issue, because if we are in a part of the test matrix specifying PHP 7.0 then we detect that and install PHPUnit 5.7 instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can possibly get a better sense of what's happening if you checkout the current trunk branch, remove the Composer lock file, and run composer i.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see!

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires woocommerce/woocommerce-sniffs 0.1.0 -> satisfiable by woocommerce/woocommerce-sniffs[0.1.0].
    - woocommerce/woocommerce-sniffs 0.1.0 requires php >=7.0 -> your php version (5.6; overridden via config.platform, actual: 8.3.9) does not satisfy that requirement.
  Problem 2
    - phpunit/phpunit[7.5.0, ..., 7.5.20] require php ^7.1 -> your php version (5.6; overridden via config.platform, actual: 8.3.9) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ^7.5 -> satisfiable by phpunit/phpunit[7.5.0, ..., 7.5.20].

@barryhughes
Copy link
Member Author

Er, our support policy here is WP - 2, right?

Yep, L-2, so we generally need to match WP 6.4 in terms of minimum supported PHP.

@coreymckrill coreymckrill merged commit e693fae into trunk Aug 15, 2024
46 checks passed
@coreymckrill coreymckrill deleted the dev/composer-php-versions branch August 15, 2024 19:49
@coreymckrill coreymckrill added this to the 3.8.2 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants